package com.itheima.es_goods_demo.mapper;

import com.itheima.es_goods_demo.pojo.Goods;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface GoodsMapper {
    @Select("select count(1) from tb_sku where status = 1")
    Integer findAll();
    @Select("select * from tb_sku where id = #{id}")
    Goods findGoodsById(Long id);
    @Select("select * from tb_sku where status = 1 limit #{a} , #{b}  ")
    List<Goods> findByPage(@Param("a") int a,@Param("b") int b);
}
